#include "common_utilities.h"

#include <QtDebug>


int Option::getProbability() const
{
    return (100 * (suggestedCount + 1)) / (rightAnswerCount + 1);
}

void printTest(Test test)
{
    qDebug() << "!!! Test !!!";
    qDebug() << "currentOptionId = " << test.currentOptionId;
    for (int i = 0; i < test.optionsList.size(); ++i)
    {
        Option a = test.optionsList[i];
        printOption(a);
    }
}

void printOption(Option option)
{
    qDebug() << "!!! Option !!!";
    qDebug() << "Id = " << option.id;
    qDebug() << "Text = " << option.text;
    qDebug() << "category = " << option.category;
    qDebug() << "path = " << option.path;
    qDebug() << "suggestedCount = " << option.suggestedCount;
    qDebug() << "rightAnswerCount = " << option.rightAnswerCount;
}
